(0) Obligation:
JBC Problem based on JBC Program:
Manifest-Version: 1.0
Created-By: 1.6.0_26 (Sun Microsystems Inc.)
Main-Class: simple/whileIncrPart/Main
package simple.whileIncrPart;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
WhileIncrPart.increase(args.length);
}
}
package simple.whileIncrPart;
public class WhileIncrPart {
public static void increase(int i) {
while (i > 0) {
if (i > 3) {
i++;
} else {
i--;
}
}
}
}
(1) JBCNonTerm (EQUIVALENT transformation)
Reached a loop using the following run:
0:
<simple.whileIncrPart.Main.main||0: load ADDR args||args: a36|| ->
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
1:
<simple.whileIncrPart.Main.main||1: arraylength|| - ||a36>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
2:
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase(I)V|| - ||4>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
3:
<simple.whileIncrPart.WhileIncrPart.increase||0: load INT i||i: 4|| ->
<simple.whileIncrPart.Main.main||2: simple.whileIncrPart.WhileIncrPart.increase|| - ||4>
String.serialVersionUID: -6849794470754667710L
String.serialPersistentFields: a34
String.CASE_INSENSITIVE_ORDER: o18
String$CaseInsensitiveComparator.serialVersionUID: 8575799808933029326L
RuntimeException.serialVersionUID: -7034897190745766939L
Exception.serialVersionUID: -3387516993124229948L
Throwable.serialVersionUID: -3042686055658047285L
o18!: String$CaseInsensitiveComparator()
a34([java.io.ObjectStreamField|]): length 0
a36([java.lang.String...]): length 4
In the loop head node, references [i17] were interesting.
By SMT, we could prove
((0 <= initial_i17 and 0 <= initial_i16) and (((path2_i17 = path2_i26 and path2_i26 = path2_i30 and path2_i33 = (path2_i30 + 1) and path2_i33 = res_i17 and path2_i16 = res_i16 and path2_i17 = initial_i17 and path2_i16 = initial_i16) and (path2_i26 > 0 and path2_i30 > 3)) and ((res_i17 = res_i26 and res_i26 = res_i30 and res_i33 = (res_i30 + 1)) and !(res_i26 > 0 and res_i30 > 3))))
to be UNSAT. Consequently, the loop will not terminate.